<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * OrderExecution
 *
 * @ORM\Table(name="ue_order_execution", indexes={@ORM\Index(name="order_id_idx", columns={"order_id"}), @ORM\Index(name="workflow_id_idx", columns={"workflow_id"}), @ORM\Index(name="node_id_idx", columns={"node_id"}), @ORM\Index(name="assignee_id_idx", columns={"assignee_id"})})
 * @ORM\Entity
 */
class OrderExecution
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="group_id", type="integer", nullable=true)
     */
    private $groupId;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=false)
     */
    private $updatedAt;

    /**
     * @var \Admin
     *
     * @ORM\ManyToOne(targetEntity="Admin")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="assignee_id", referencedColumnName="id")
     * })
     */
    private $assignee;

    /**
     * @var \WorkflowNode
     *
     * @ORM\ManyToOne(targetEntity="WorkflowNode")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="node_id", referencedColumnName="id")
     * })
     */
    private $node;

    /**
     * @var \Order
     *
     * @ORM\ManyToOne(targetEntity="Order")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="order_id", referencedColumnName="id")
     * })
     */
    private $order;

    /**
     * @var \Workflow
     *
     * @ORM\ManyToOne(targetEntity="Workflow")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="workflow_id", referencedColumnName="id")
     * })
     */
    private $workflow;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set groupId
     *
     * @param integer $groupId
     * @return OrderExecution
     */
    public function setGroupId($groupId)
    {
        $this->groupId = $groupId;

        return $this;
    }

    /**
     * Get groupId
     *
     * @return integer 
     */
    public function getGroupId()
    {
        return $this->groupId;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return OrderExecution
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return OrderExecution
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set assignee
     *
     * @param \Ue\ErpBundle\Entity\Admin $assignee
     * @return OrderExecution
     */
    public function setAssignee(\Ue\ErpBundle\Entity\Admin $assignee = null)
    {
        $this->assignee = $assignee;

        return $this;
    }

    /**
     * Get assignee
     *
     * @return \Ue\ErpBundle\Entity\Admin 
     */
    public function getAssignee()
    {
        return $this->assignee;
    }

    /**
     * Set node
     *
     * @param \Ue\ErpBundle\Entity\WorkflowNode $node
     * @return OrderExecution
     */
    public function setNode(\Ue\ErpBundle\Entity\WorkflowNode $node = null)
    {
        $this->node = $node;

        return $this;
    }

    /**
     * Get node
     *
     * @return \Ue\ErpBundle\Entity\WorkflowNode 
     */
    public function getNode()
    {
        return $this->node;
    }

    /**
     * Set order
     *
     * @param \Ue\ErpBundle\Entity\Order $order
     * @return OrderExecution
     */
    public function setOrder(\Ue\ErpBundle\Entity\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }

    /**
     * Get order
     *
     * @return \Ue\ErpBundle\Entity\Order 
     */
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * Set workflow
     *
     * @param \Ue\ErpBundle\Entity\Workflow $workflow
     * @return OrderExecution
     */
    public function setWorkflow(\Ue\ErpBundle\Entity\Workflow $workflow = null)
    {
        $this->workflow = $workflow;

        return $this;
    }

    /**
     * Get workflow
     *
     * @return \Ue\ErpBundle\Entity\Workflow 
     */
    public function getWorkflow()
    {
        return $this->workflow;
    }
}
